package cn.spring.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import cn.spring.bean.Employee;


public interface EmployeeMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Employee record);

    int insertSelective(Employee record);

    Employee selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Employee record);

    int updateByPrimaryKey(Employee record);
    
    Employee login(Employee record);
    
    int phonePan(String phone);
    
    List<Employee> getAll();
    
    int updateIstong(Integer id,Integer state);
    
    int updateRole(Integer id,Integer role);
    
    @Select("select * from employee where id=#{id}")
    List<Employee> getAllById(@Param("id")Integer id);
    
    @Update("update employee set name=#{name} where id=#{id}")
    public void xiugaidianming(@Param("name")String name,@Param("id")Integer id);
    
    @Update("update employee set pwd=#{pwd} where id=#{id}")
    public int updatePwd(@Param("pwd")String pwd,@Param("id")Integer id);
}